class UserInfoEntity {
  UserInfoEntity({
     this.admin,
     this.chapterTops,
     this.coinCount,
     this.collectIds,
     this.email,
     this.icon,
     this.id,
     this.nickname,
     this.password,
     this.publicName,
     this.token,
     this.type,
     this.username,
  });

  final bool? admin;
  final List<dynamic>? chapterTops;
  final int? coinCount;
  final List<dynamic>? collectIds;
  final String? email;
  final String? icon;
  final int? id;
  final String? nickname;
  final String? password;
  final String? publicName;
  final String? token;
  final int? type;
  final String? username;

  factory UserInfoEntity.fromJson(Map<String, dynamic> json){
    return UserInfoEntity(
      admin: json["admin"],
      chapterTops: json["chapterTops"] == null ? [] : List<dynamic>.from(json["chapterTops"]!.map((x) => x)),
      coinCount: json["coinCount"],
      collectIds: json["collectIds"] == null ? [] : List<dynamic>.from(json["collectIds"]!.map((x) => x)),
      email: json["email"],
      icon: json["icon"],
      id: json["id"],
      nickname: json["nickname"],
      password: json["password"],
      publicName: json["publicName"],
      token: json["token"],
      type: json["type"],
      username: json["username"],
    );
  }


  @override
  String toString(){
    return "$admin, $chapterTops, $coinCount, $collectIds, $email, $icon, $id, $nickname, $password, $publicName, $token, $type, $username, ";
  }
}
